<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
	<script type="text/javascript" src="../js/jquery.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
			$("#button1").click(function(){
				$("li:first").css("color","#FF3300");//这里匹配了<li>javascript</li>
			});
			$("#button2").click(function(){
				$("li:first-child").css("color","#0071db");//这里匹配了<li>javascript</li>、<li>actionscript</li>、<li>群里吹水</li>
			});
		});
	</script>
</head>

<body>
	<h3>我正在学习并且应用的技术</h3>
	<ul>
		<li>javascript</li>
		<li>css2.1</li>
		<li>html4</li>
		<li>MXML</li>
	</ul>
	<h3>我想学习的技术</h3>
	<ul>
		<li>actionscript</li>
		<li>css 3</li>
		<li>html 5</li>
		<li>PHP</li>
	</ul>
	<h3>我精通的技术</h3>
	<ul>
		<li>群里吹水</li>
		<li>忽悠新人</li>
	</ul>
	<div><input type="submit" name="button" id="button1" value="测试$('li:first')" />
  <input type="submit" name="button" id="button2" value="测试$('li:first-child')" /></div>

</body>
</html>
